<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>Emitting Inter Schemas</title>
<link href="../docs-assets/Breadcrumbs.css" rel="stylesheet" rev="stylesheet" type="text/css">
		<meta name="viewport" content="width=device-width initial-scale=1">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta http-equiv="Content-Language" content="en-gb">

<link href="../docs-assets/Contents.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Progress.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Navigation.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Fonts.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Base.css" rel="stylesheet" rev="stylesheet" type="text/css">
<script>
function togglePopup(material_id) {
  var popup = document.getElementById(material_id);
  popup.classList.toggle("show");
}
</script>

<link href="../docs-assets/Popups.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Colours.css" rel="stylesheet" rev="stylesheet" type="text/css">
		
	</head>
	<body class="commentary-font">
		<nav role="navigation">
		<h1><a href="../index.html"><img src="../docs-assets/Inform.png" height=72> </a></h1>
<ul><li><a href="../index.html">home</a></li>
</ul><h2>Compiler</h2><ul>
<li><a href="../structure.html">structure</a></li>
<li><a href="../inbuildn.html">inbuild</a></li>
<li><a href="../inform7n.html">inform7</a></li>
<li><a href="../intern.html">inter</a></li>
<li><a href="../services.html">services</a></li>
<li><a href="../secrets.html">secrets</a></li>
</ul><h2>Other Tools</h2><ul>
<li><a href="../inblorbn.html">inblorb</a></li>
<li><a href="../inform6.html">inform6</a></li>
<li><a href="../inpolicyn.html">inpolicy</a></li>
</ul><h2>Resources</h2><ul>
<li><a href="../extensions.html">extensions</a></li>
<li><a href="../kits.html">kits</a></li>
</ul><h2>Repository</h2><ul>
<li><a href="https://github.com/ganelson/inform"><img src="../docs-assets/github.png" height=0> github</a></li>
</ul><h2>Related Projects</h2><ul>
<li><a href="https://github.com/ganelson/inweb"><img src="../docs-assets/github.png" height=0> inweb</a></li>
<li><a href="https://github.com/ganelson/intest"><img src="../docs-assets/github.png" height=0> intest</a></li>
</ul>
		</nav>
		<main role="main">
		<!-- Weave of 'Emitting Inter Schemas' generated by inweb -->
<div class="breadcrumbs">
    <ul class="crumbs"><li><a href="../index.html">Home</a></li><li><a href="../intern.html">Inter Modules</a></li><li><a href="index.html">building</a></li><li><a href="index.html#2">Chapter 2: Blueprints</a></li><li><b>Emitting Inter Schemas</b></li></ul></div>
<p class="purpose">To compile Inter code following the model in an Inter schema tree.</p>

<p class="commentary firstcommentary"><a id="SP1" class="paragraph-anchor"></a><b>&#167;1. </b>This section presents just one function to the rest of Inform: it compiles
Inter code from a schema. Though there are many arguments, this is still fairly
simple to use:
</p>

<ul class="items"><li>&#9679; <span class="extract"><span class="extract-syntax">I</span></span> is the tree to compile code into. Code will appear at the current write
position in that tree.
</li><li>&#9679; <span class="extract"><span class="extract-syntax">VH</span></span> is a value holster (see <a href="3-vh.html" class="internal">Value Holsters</a>), but a simple one: it either
says "generate code in a void context" (that's <span class="extract"><span class="extract-syntax">INTER_VOID_VHMODE</span></span>) or "generate
code in a value context" (<span class="extract"><span class="extract-syntax">INTER_VAL_VHMODE</span></span>). The difference is that, say,
statements such as <span class="extract"><span class="extract-syntax">print "Hello";</span></span> cannot be compiled in a value context, only
in a void one.
</li><li>&#9679; <span class="extract"><span class="extract-syntax">sch</span></span> is the schema to compile from. It is unchanged by the process, except
that nodes made inaccessible by conditional compilation are marked as such.
</li><li>&#9679; If the schema mentions identifiers &mdash; as for example <span class="extract"><span class="extract-syntax">DoSomething(1, 2)</span></span>
mentions the identifier <span class="extract"><span class="extract-syntax">DoSomething</span></span> &mdash; then these must somehow be matched up
with <span class="extract"><span class="extract-syntax">inter_symbol</span></span>s giving them a meaning. <span class="extract"><span class="extract-syntax">finder</span></span> says how: see <a href="2-if.html" class="internal">Identifier Finders</a>.
</li><li>&#9679; As we have seen, schema notation is (almost) Inform 6 syntax, except for two
big extensions: one is Inform 7 source text placed between <span class="extract"><span class="extract-syntax">(+</span></span> and <span class="extract"><span class="extract-syntax">+)</span></span> markers,
and the other is braced commands like <span class="extract"><span class="extract-syntax">{-by-reference: X}</span></span>. The code below cannot
deal with either of these. Instead, we must supply callback functions to deal
with them as they arise. (Supplying <span class="extract"><span class="extract-syntax">NULL</span></span> as either of these makes the relevant
notation do nothing.)
</li><li>&#9679; <span class="extract"><span class="extract-syntax">opaque_state</span></span> is a pointer to any data which you, the caller, want to be
passed through to those two callback functions. The code below otherwise makes
no use of it; and it can of course be <span class="extract"><span class="extract-syntax">NULL</span></span> if no state is needed.
</li></ul>
<p class="commentary">So the simplest valid usage of the function would be something like:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">value_holster</span><span class="plain-syntax"> </span><span class="identifier-syntax">VH</span><span class="plain-syntax"> = </span><span class="function-syntax">Holsters::new</span><span class="plain-syntax">(</span><span class="constant-syntax">INTER_VOID_VHMODE</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">identifier_finder</span><span class="plain-syntax"> </span><span class="identifier-syntax">finder</span><span class="plain-syntax"> = </span><span class="function-syntax">IdentifierFinders::common_names_only</span><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="function-syntax">EmitInterSchemas::emit</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, &amp;</span><span class="identifier-syntax">VH</span><span class="plain-syntax">, </span><span class="identifier-syntax">sch</span><span class="plain-syntax">, </span><span class="identifier-syntax">finder</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">);</span>
</pre>
<p class="commentary">which roughly means "compile pure Inform 6 code to Inter in a void context, but
do not recognise any identifiers as corresponding to local variables".
</p>

<p class="commentary">Note that emission can turn up syntax errors which went undetected earlier
(because they depend more on context); if so, these are attached to the schema.
It's the caller's responsibility to check for those and act accordingly.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">EmitInterSchemas::emit</span><span class="plain-syntax">(</span><span class="identifier-syntax">inter_tree</span><span class="plain-syntax"> *</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="reserved-syntax">value_holster</span><span class="plain-syntax"> *</span><span class="identifier-syntax">VH</span><span class="plain-syntax">, </span><span class="reserved-syntax">inter_schema</span><span class="plain-syntax"> *</span><span class="identifier-syntax">sch</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">identifier_finder</span><span class="plain-syntax"> </span><span class="identifier-syntax">finder</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">void</span><span class="plain-syntax"> (*</span><span class="identifier-syntax">inline_command_handler</span><span class="plain-syntax">)(</span><span class="reserved-syntax">value_holster</span><span class="plain-syntax"> *</span><span class="identifier-syntax">VH</span><span class="plain-syntax">, </span><span class="reserved-syntax">inter_schema_token</span><span class="plain-syntax"> *</span><span class="identifier-syntax">t</span><span class="plain-syntax">,</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">void</span><span class="plain-syntax"> *</span><span class="identifier-syntax">opaque_state</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">prim_cat</span><span class="plain-syntax">, </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">L</span><span class="plain-syntax">),</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">void</span><span class="plain-syntax"> (*</span><span class="identifier-syntax">i7_source_handler</span><span class="plain-syntax">)(</span><span class="reserved-syntax">value_holster</span><span class="plain-syntax"> *</span><span class="identifier-syntax">VH</span><span class="plain-syntax">, </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">S</span><span class="plain-syntax">,</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">void</span><span class="plain-syntax"> *</span><span class="identifier-syntax">opaque_state</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">prim_cat</span><span class="plain-syntax">),</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">void</span><span class="plain-syntax"> *</span><span class="identifier-syntax">opaque_state</span><span class="plain-syntax">) {</span>

<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP1_1" class="named-paragraph-link"><span class="named-paragraph">Reset the write position if we're in the middle of a switch statement</span><span class="named-paragraph-number">1.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP1_2" class="named-paragraph-link"><span class="named-paragraph">Recursively deal with conditional compilation</span><span class="named-paragraph-number">1.2</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP1_3" class="named-paragraph-link"><span class="named-paragraph">Traverse the tree, compiling each node</span><span class="named-paragraph-number">1.3</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP1_1" class="paragraph-anchor"></a><b>&#167;1.1. </b>This allows a very edgy edge case: schemas which make case constructions making
sense only within a switch statement, but where the schema does not itself
include the <span class="extract"><span class="extract-syntax">switch</span></span> head or tail.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Reset the write position if we're in the middle of a switch statement</span><span class="named-paragraph-number">1.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">sch</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">mid_case</span><span class="plain-syntax">) </span><a href="3-prd.html#SP10" class="function-link"><span class="function-syntax">Produce::set_level_to_current_code_block_plus</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="constant-syntax">4</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP1">&#167;1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_2" class="paragraph-anchor"></a><b>&#167;1.2. </b>The following looks for conditional compilations such as:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    #</span><span class="identifier-syntax">ifdef</span><span class="plain-syntax"> </span><span class="identifier-syntax">TARGET_GLULX</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"This is Glulx</span><span class="comment-syntax">;</span>
<span class="string-syntax">    #endif</span>
</pre>
<p class="commentary">and strikes out any nodes which are not to be compiled from &mdash; for example, the
<span class="extract"><span class="extract-syntax">print</span></span> statement here would be marked as <span class="extract"><span class="extract-syntax">blocked_by_conditional</span></span> if the symbol
<span class="extract"><span class="extract-syntax">TARGET_GLULX</span></span> were not defined.
</p>

<p class="commentary">Note that this is done only once for each schema, so we are implicitly assuming
that the outcome of <span class="extract"><span class="extract-syntax">#ifdef TARGET_GLULX;</span></span> would be the same every time during the
same run of <a href="../inform7/index.html" class="internal">inform7</a> or <a href="../inter/index.html" class="internal">inter</a>. But of course it must be, since although
we may generate many times from the same schema, it will always be within the
same machine architecture each time.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Recursively deal with conditional compilation</span><span class="named-paragraph-number">1.2</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">again</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">while</span><span class="plain-syntax"> (</span><span class="identifier-syntax">again</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">again</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">inter_schema_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">node</span><span class="plain-syntax"> = </span><span class="identifier-syntax">sch</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">node_tree</span><span class="plain-syntax">; </span><span class="identifier-syntax">node</span><span class="plain-syntax">; </span><span class="identifier-syntax">node</span><span class="plain-syntax">=</span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">)</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="2-eis.html#SP2" class="function-link"><span class="function-syntax">EmitInterSchemas::process_conditionals</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">node</span><span class="plain-syntax">, </span><span class="identifier-syntax">finder</span><span class="plain-syntax">))</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">again</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP1">&#167;1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP2" class="paragraph-anchor"></a><b>&#167;2. </b></p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">EmitInterSchemas::process_conditionals</span><button class="popup" onclick="togglePopup('usagePopup1')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup1">Usage of <span class="code-font"><span class="function-syntax">EmitInterSchemas::process_conditionals</span></span>:<br/><a href="2-eis.html#SP1_2">&#167;1.2</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">inter_tree</span><span class="plain-syntax"> *</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="reserved-syntax">inter_schema_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">identifier_finder</span><span class="plain-syntax"> </span><span class="identifier-syntax">finder</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">dir_node</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">blocked_by_conditional</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">isn_type</span><span class="plain-syntax"> == </span><span class="constant-syntax">DIRECTIVE_ISNT</span><span class="plain-syntax">) </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP2_1" class="named-paragraph-link"><span class="named-paragraph">Directive</span><span class="named-paragraph-number">2.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">=</span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">; </span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">; </span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">=</span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="2-eis.html#SP2" class="function-link"><span class="function-syntax">EmitInterSchemas::process_conditionals</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">, </span><span class="identifier-syntax">finder</span><span class="plain-syntax">))</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">; </span><span class="comment-syntax"> signalling the function should not be called again</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP2_1" class="paragraph-anchor"></a><b>&#167;2.1. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Directive</span><span class="named-paragraph-number">2.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">dir_clarifier</span><span class="plain-syntax"> == </span><span class="constant-syntax">IFDEF_I6RW</span><span class="plain-syntax">) ||</span>
<span class="plain-syntax">        (</span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">dir_clarifier</span><span class="plain-syntax"> == </span><span class="constant-syntax">IFNDEF_I6RW</span><span class="plain-syntax">) ||</span>
<span class="plain-syntax">        (</span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">dir_clarifier</span><span class="plain-syntax"> == </span><span class="constant-syntax">IFTRUE_I6RW</span><span class="plain-syntax">) ||</span>
<span class="plain-syntax">        (</span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">dir_clarifier</span><span class="plain-syntax"> == </span><span class="constant-syntax">IFFALSE_I6RW</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">SCHEMA_COMPILATION</span><span class="plain-syntax">, </span><span class="string-syntax">"Conditional directive in schema!\n"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_schema_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">ifnot_node</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">, *</span><span class="identifier-syntax">endif_node</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP2_1_1" class="named-paragraph-link"><span class="named-paragraph">Find the clauses of the conditional we will resolve</span><span class="named-paragraph-number">2.1.1</span></a></span><span class="plain-syntax">;</span>

<span class="plain-syntax">        </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">symbol_to_check</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">value_to_check</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">operation_to_check</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP2_1_2" class="named-paragraph-link"><span class="named-paragraph">Work out what the condition is</span><span class="named-paragraph-number">2.1.2</span></a></span><span class="plain-syntax">;</span>

<span class="plain-syntax">        </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">val</span><span class="plain-syntax"> = -1, </span><span class="identifier-syntax">def</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP2_1_3" class="named-paragraph-link"><span class="named-paragraph">Find out whether this symbol is defined, and if so, what its value is</span><span class="named-paragraph-number">2.1.3</span></a></span><span class="plain-syntax">;</span>

<span class="plain-syntax">        </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">decision</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP2_1_4" class="named-paragraph-link"><span class="named-paragraph">Decide whether the condition is met or not</span><span class="named-paragraph-number">2.1.4</span></a></span><span class="plain-syntax">;</span>

<span class="plain-syntax">        </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP2_1_5" class="named-paragraph-link"><span class="named-paragraph">Mark the three clause nodes as blocked</span><span class="named-paragraph-number">2.1.5</span></a></span><span class="plain-syntax">;</span>

<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">decision</span><span class="plain-syntax"> == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP2_1_6" class="named-paragraph-link"><span class="named-paragraph">Mark the if body as blocked</span><span class="named-paragraph-number">2.1.6</span></a></span>
<span class="plain-syntax">        </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP2_1_7" class="named-paragraph-link"><span class="named-paragraph">Mark the if-not body as blocked</span><span class="named-paragraph-number">2.1.7</span></a></span><span class="plain-syntax">;</span>

<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Log::aspect_switched_on</span><span class="plain-syntax">(</span><span class="constant-syntax">SCHEMA_COMPILATION_DA</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">LOG</span><span class="plain-syntax">(</span><span class="string-syntax">"--- Resulting in: ---\n"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">inter_schema_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">; </span><span class="identifier-syntax">at</span><span class="plain-syntax">; </span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">)</span>
<span class="plain-syntax">                </span><a href="2-is.html#SP17" class="function-link"><span class="function-syntax">InterSchemas::log_just</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">at</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">LOG</span><span class="plain-syntax">(</span><span class="string-syntax">"------\n"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">; </span><span class="comment-syntax"> forcing this function to be called again</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP2">&#167;2</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP2_1_1" class="paragraph-anchor"></a><b>&#167;2.1.1. </b>The aim here is to find an innermost conditional, setting <span class="extract"><span class="extract-syntax">dir_node</span></span> to its
head, <span class="extract"><span class="extract-syntax">ifnot_node</span></span> to the position of the <span class="extract"><span class="extract-syntax">#Ifnot</span></span> &mdash; if there is one; they
are optional in I6 &mdash; and <span class="extract"><span class="extract-syntax">endif_node</span></span> to the position of its <span class="extract"><span class="extract-syntax">#Endif</span></span>, whose
existence is mandatory. For example:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    #</span><span class="identifier-syntax">ifdef</span><span class="plain-syntax"> </span><span class="identifier-syntax">TARGET_ZCODE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    #</span><span class="identifier-syntax">ifdef</span><span class="plain-syntax"> </span><span class="identifier-syntax">DEBUG</span><span class="plain-syntax">;            &lt;--- </span><span class="identifier-syntax">dir_node</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"ZD</span><span class="comment-syntax">;</span>
<span class="string-syntax">    #ifnot;                  &lt;--- ifnot_node</span>
<span class="string-syntax">    print "</span><span class="identifier-syntax">Z</span><span class="comment-syntax">;</span>
<span class="plain-syntax">    #</span><span class="identifier-syntax">endif</span><span class="plain-syntax">;                  &lt;--- </span><span class="identifier-syntax">endif_node</span>
<span class="plain-syntax">    #</span><span class="identifier-syntax">endif</span><span class="plain-syntax">;</span>
</pre>
<p class="commentary">Note that we only need find one such conditional, because once we resolve it,
we will return but the function will then be applied again, and so on until
all conditionals are resolved.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Find the clauses of the conditional we will resolve</span><span class="named-paragraph-number">2.1.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_schema_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">while</span><span class="plain-syntax"> (</span><span class="identifier-syntax">at</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">blocked_by_conditional</span><span class="plain-syntax"> == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">dir_clarifier</span><span class="plain-syntax"> == </span><span class="constant-syntax">IFDEF_I6RW</span><span class="plain-syntax">)   { </span><span class="identifier-syntax">dir_node</span><span class="plain-syntax"> = </span><span class="identifier-syntax">at</span><span class="plain-syntax">; </span><span class="identifier-syntax">ifnot_node</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">dir_clarifier</span><span class="plain-syntax"> == </span><span class="constant-syntax">IFNDEF_I6RW</span><span class="plain-syntax">)  { </span><span class="identifier-syntax">dir_node</span><span class="plain-syntax"> = </span><span class="identifier-syntax">at</span><span class="plain-syntax">; </span><span class="identifier-syntax">ifnot_node</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">dir_clarifier</span><span class="plain-syntax"> == </span><span class="constant-syntax">IFTRUE_I6RW</span><span class="plain-syntax">)  { </span><span class="identifier-syntax">dir_node</span><span class="plain-syntax"> = </span><span class="identifier-syntax">at</span><span class="plain-syntax">; </span><span class="identifier-syntax">ifnot_node</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">dir_clarifier</span><span class="plain-syntax"> == </span><span class="constant-syntax">IFFALSE_I6RW</span><span class="plain-syntax">) { </span><span class="identifier-syntax">dir_node</span><span class="plain-syntax"> = </span><span class="identifier-syntax">at</span><span class="plain-syntax">; </span><span class="identifier-syntax">ifnot_node</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">dir_clarifier</span><span class="plain-syntax"> == </span><span class="constant-syntax">IFNOT_I6RW</span><span class="plain-syntax">)   { </span><span class="identifier-syntax">ifnot_node</span><span class="plain-syntax"> = </span><span class="identifier-syntax">at</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">dir_clarifier</span><span class="plain-syntax"> == </span><span class="constant-syntax">ENDIF_I6RW</span><span class="plain-syntax">)   { </span><span class="identifier-syntax">endif_node</span><span class="plain-syntax"> = </span><span class="identifier-syntax">at</span><span class="plain-syntax">; </span><span class="reserved-syntax">break</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">endif_node</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><a href="2-i6se.html#SP4" class="function-link"><span class="function-syntax">I6Errors::issue_at_node</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"no matching '#endif'"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP2_1">&#167;2.1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP2_1_2" class="paragraph-anchor"></a><b>&#167;2.1.2. </b>We are going to recognise only very simple conditions, such as:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    #</span><span class="identifier-syntax">ifdef</span><span class="plain-syntax"> </span><span class="identifier-syntax">SYMBOL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    #</span><span class="identifier-syntax">iftrue</span><span class="plain-syntax"> </span><span class="identifier-syntax">SYMBOL</span><span class="plain-syntax"> == </span><span class="identifier-syntax">N</span><span class="plain-syntax">;</span>
</pre>
<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Work out what the condition is</span><span class="named-paragraph-number">2.1.2</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">dir_clarifier</span><span class="plain-syntax"> == </span><span class="constant-syntax">IFDEF_I6RW</span><span class="plain-syntax">) ||</span>
<span class="plain-syntax">        (</span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">dir_clarifier</span><span class="plain-syntax"> == </span><span class="constant-syntax">IFNDEF_I6RW</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) ||</span>
<span class="plain-syntax">            (</span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">expression_tokens</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><a href="2-i6se.html#SP4" class="function-link"><span class="function-syntax">I6Errors::issue_at_node</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"bare '#ifdef' or '#ifndef'"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">symbol_to_check</span><span class="plain-syntax"> = </span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">expression_tokens</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_schema_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">to_eval</span><span class="plain-syntax"> = </span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">while</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">to_eval</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">to_eval</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">isn_type</span><span class="plain-syntax"> == </span><span class="constant-syntax">SUBEXPRESSION_ISNT</span><span class="plain-syntax">))</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">to_eval</span><span class="plain-syntax"> = </span><span class="identifier-syntax">to_eval</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">to_eval</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) || (</span><span class="identifier-syntax">to_eval</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) ||</span>
<span class="plain-syntax">            (</span><span class="identifier-syntax">to_eval</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">expression_tokens</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><a href="2-i6se.html#SP4" class="function-link"><span class="function-syntax">I6Errors::issue_at_node</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"malformed '#if...'"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">symbol_to_check</span><span class="plain-syntax"> = </span><span class="identifier-syntax">to_eval</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">expression_tokens</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">operation_to_check</span><span class="plain-syntax"> = </span><span class="identifier-syntax">to_eval</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">isn_clarifier</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">value_to_check</span><span class="plain-syntax"> = </span><span class="identifier-syntax">to_eval</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">expression_tokens</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">SCHEMA_COMPILATION</span><span class="plain-syntax">, </span><span class="string-syntax">"Means checking %S\n"</span><span class="plain-syntax">, </span><span class="identifier-syntax">symbol_to_check</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">value_to_check</span><span class="plain-syntax">) </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">SCHEMA_COMPILATION</span><span class="plain-syntax">, </span><span class="string-syntax">"Against %S\n"</span><span class="plain-syntax">, </span><span class="identifier-syntax">value_to_check</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP2_1">&#167;2.1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP2_1_3" class="paragraph-anchor"></a><b>&#167;2.1.3. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Find out whether this symbol is defined, and if so, what its value is</span><span class="named-paragraph-number">2.1.3</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::eq</span><span class="plain-syntax">(</span><span class="identifier-syntax">symbol_to_check</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"#version_number"</span><span class="plain-syntax">)) { </span><span class="identifier-syntax">val</span><span class="plain-syntax"> = </span><span class="constant-syntax">8</span><span class="plain-syntax">; </span><span class="identifier-syntax">def</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::eq</span><span class="plain-syntax">(</span><span class="identifier-syntax">symbol_to_check</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"STRICT_MODE"</span><span class="plain-syntax">)) { </span><span class="identifier-syntax">def</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">identifier_finder</span><span class="plain-syntax"> </span><span class="identifier-syntax">global_finder</span><span class="plain-syntax"> = </span><span class="identifier-syntax">finder</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><a href="2-if.html#SP3" class="function-link"><span class="function-syntax">IdentifierFinders::next_priority</span></a><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">global_finder</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">InterPackage::scope</span><span class="plain-syntax">(</span><a href="1-ls.html#SP7" class="function-link"><span class="function-syntax">LargeScale::architecture_package</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">)));</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">symb</span><span class="plain-syntax"> = </span><a href="2-if.html#SP5" class="function-link"><span class="function-syntax">IdentifierFinders::find</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">symbol_to_check</span><span class="plain-syntax">, </span><span class="identifier-syntax">global_finder</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">symb</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Wiring::cable_end</span><span class="plain-syntax">(</span><span class="identifier-syntax">symb</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">SCHEMA_COMPILATION</span><span class="plain-syntax">, </span><span class="string-syntax">"Symb is $3\n"</span><span class="plain-syntax">, </span><span class="identifier-syntax">symb</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">InterSymbol::is_defined</span><span class="plain-syntax">(</span><span class="identifier-syntax">symb</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">def</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">val</span><span class="plain-syntax"> = </span><span class="identifier-syntax">InterSymbol::evaluate_to_int</span><span class="plain-syntax">(</span><span class="identifier-syntax">symb</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">SCHEMA_COMPILATION</span><span class="plain-syntax">, </span><span class="string-syntax">"Defined: %d, value: %d\n"</span><span class="plain-syntax">, </span><span class="identifier-syntax">def</span><span class="plain-syntax">, </span><span class="identifier-syntax">val</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP2_1">&#167;2.1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP2_1_4" class="paragraph-anchor"></a><b>&#167;2.1.4. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Decide whether the condition is met or not</span><span class="named-paragraph-number">2.1.4</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">dir_clarifier</span><span class="plain-syntax"> == </span><span class="constant-syntax">IFNDEF_I6RW</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        || (</span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">dir_clarifier</span><span class="plain-syntax"> == </span><span class="constant-syntax">IFDEF_I6RW</span><span class="plain-syntax">)) </span><span class="identifier-syntax">decision</span><span class="plain-syntax"> = </span><span class="identifier-syntax">def</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">h</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Str::atoi</span><span class="plain-syntax">(</span><span class="identifier-syntax">value_to_check</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">SCHEMA_COMPILATION</span><span class="plain-syntax">, </span><span class="string-syntax">"Want value %d\n"</span><span class="plain-syntax">, </span><span class="identifier-syntax">h</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">operation_to_check</span><span class="plain-syntax"> == </span><span class="constant-syntax">EQ_BIP</span><span class="plain-syntax">) </span><span class="identifier-syntax">decision</span><span class="plain-syntax"> = (</span><span class="identifier-syntax">val</span><span class="plain-syntax"> == </span><span class="identifier-syntax">h</span><span class="plain-syntax">)?</span><span class="identifier-syntax">TRUE:FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">operation_to_check</span><span class="plain-syntax"> == </span><span class="constant-syntax">NE_BIP</span><span class="plain-syntax">) </span><span class="identifier-syntax">decision</span><span class="plain-syntax"> = (</span><span class="identifier-syntax">val</span><span class="plain-syntax"> != </span><span class="identifier-syntax">h</span><span class="plain-syntax">)?</span><span class="identifier-syntax">TRUE:FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">operation_to_check</span><span class="plain-syntax"> == </span><span class="constant-syntax">GE_BIP</span><span class="plain-syntax">) </span><span class="identifier-syntax">decision</span><span class="plain-syntax"> = (</span><span class="identifier-syntax">val</span><span class="plain-syntax"> &gt;= </span><span class="identifier-syntax">h</span><span class="plain-syntax">)?</span><span class="identifier-syntax">TRUE:FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">operation_to_check</span><span class="plain-syntax"> == </span><span class="constant-syntax">GT_BIP</span><span class="plain-syntax">) </span><span class="identifier-syntax">decision</span><span class="plain-syntax"> = (</span><span class="identifier-syntax">val</span><span class="plain-syntax"> &gt; </span><span class="identifier-syntax">h</span><span class="plain-syntax">)?</span><span class="identifier-syntax">TRUE:FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">operation_to_check</span><span class="plain-syntax"> == </span><span class="constant-syntax">LE_BIP</span><span class="plain-syntax">) </span><span class="identifier-syntax">decision</span><span class="plain-syntax"> = (</span><span class="identifier-syntax">val</span><span class="plain-syntax"> &lt;= </span><span class="identifier-syntax">h</span><span class="plain-syntax">)?</span><span class="identifier-syntax">TRUE:FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">operation_to_check</span><span class="plain-syntax"> == </span><span class="constant-syntax">LT_BIP</span><span class="plain-syntax">) </span><span class="identifier-syntax">decision</span><span class="plain-syntax"> = (</span><span class="identifier-syntax">val</span><span class="plain-syntax"> &lt; </span><span class="identifier-syntax">h</span><span class="plain-syntax">)?</span><span class="identifier-syntax">TRUE:FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">dir_clarifier</span><span class="plain-syntax"> == </span><span class="constant-syntax">IFNDEF_I6RW</span><span class="plain-syntax">) </span><span class="identifier-syntax">decision</span><span class="plain-syntax"> = </span><span class="identifier-syntax">decision</span><span class="plain-syntax">?</span><span class="identifier-syntax">FALSE:TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">dir_clarifier</span><span class="plain-syntax"> == </span><span class="constant-syntax">IFFALSE_I6RW</span><span class="plain-syntax">) </span><span class="identifier-syntax">decision</span><span class="plain-syntax"> = </span><span class="identifier-syntax">decision</span><span class="plain-syntax">?</span><span class="identifier-syntax">FALSE:TRUE</span><span class="plain-syntax">;</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP2_1">&#167;2.1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP2_1_5" class="paragraph-anchor"></a><b>&#167;2.1.5. </b>Note that marking the clauses this way ensures that the next call to this
function will not pick up this same conditional again. The repeated calling
must therefore terminate, because the schema is finite in size and on each
call returning <span class="extract"><span class="extract-syntax">TRUE</span></span> at least 2 previously unblocked nodes are marked as blocked.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Mark the three clause nodes as blocked</span><span class="named-paragraph-number">2.1.5</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">blocked_by_conditional</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">endif_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">blocked_by_conditional</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ifnot_node</span><span class="plain-syntax">) </span><span class="identifier-syntax">ifnot_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">blocked_by_conditional</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP2_1">&#167;2.1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP2_1_6" class="paragraph-anchor"></a><b>&#167;2.1.6. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Mark the if body as blocked</span><span class="named-paragraph-number">2.1.6</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_schema_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">dir_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">while</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">at</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">at</span><span class="plain-syntax"> != </span><span class="identifier-syntax">endif_node</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">at</span><span class="plain-syntax"> != </span><span class="identifier-syntax">ifnot_node</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">blocked_by_conditional</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP2_1">&#167;2.1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP2_1_7" class="paragraph-anchor"></a><b>&#167;2.1.7. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Mark the if-not body as blocked</span><span class="named-paragraph-number">2.1.7</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_schema_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">ifnot_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">while</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">at</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">at</span><span class="plain-syntax"> != </span><span class="identifier-syntax">endif_node</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">blocked_by_conditional</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP2_1">&#167;2.1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_3" class="paragraph-anchor"></a><b>&#167;1.3. </b>That disposes of conditional compilation: finally we can emit unconditional
code. We do that with a recursive function; since the many parameters have to
be passed down through each call, using the following macro makes everything
easier to read. <span class="extract"><span class="extract-syntax">node</span></span> is the current node to compile, of course; <span class="extract"><span class="extract-syntax">prim_cat</span></span>
is the "primitive category", which is Inter jargon for context.
</p>

<p class="commentary">The category at the top of the tree depends on whether we are compiling the
schema in void or value context, which is signalled to us by <span class="extract"><span class="extract-syntax">VH</span></span>. As we
recurse downwards, though, the category will change. The schema <span class="extract"><span class="extract-syntax">print n;</span></span>
begins in <span class="extract"><span class="extract-syntax">CODE_PRIM_CAT</span></span> (i.e., void context), but by the time the node for
<span class="extract"><span class="extract-syntax">n</span></span> is reached, we must be in <span class="extract"><span class="extract-syntax">VAL_PRIM_CAT</span></span>.
</p>

<pre class="definitions code-font"><span class="definition-keyword">define</span> <span class="identifier-syntax">EIS_RECURSE</span><span class="plain-syntax">(</span><span class="identifier-syntax">node</span><span class="plain-syntax">, </span><span class="identifier-syntax">prim_cat</span><span class="plain-syntax">)</span>
<span class="plain-syntax">     </span><a href="2-eis.html#SP3" class="function-link"><span class="function-syntax">EmitInterSchemas::emit_recursively</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">node</span><span class="plain-syntax">, </span><span class="identifier-syntax">VH</span><span class="plain-syntax">, </span><span class="identifier-syntax">sch</span><span class="plain-syntax">, </span><span class="identifier-syntax">opaque_state</span><span class="plain-syntax">, </span><span class="identifier-syntax">prim_cat</span><span class="plain-syntax">,</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">finder</span><span class="plain-syntax">, </span><span class="identifier-syntax">inline_command_handler</span><span class="plain-syntax">, </span><span class="identifier-syntax">i7_source_handler</span><span class="plain-syntax">);</span>
</pre>
<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Traverse the tree, compiling each node</span><span class="named-paragraph-number">1.3</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">prim_cat</span><span class="plain-syntax"> = </span><span class="identifier-syntax">CODE_PRIM_CAT</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">VH</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">vhmode_wanted</span><span class="plain-syntax"> == </span><span class="constant-syntax">INTER_VAL_VHMODE</span><span class="plain-syntax">) </span><span class="identifier-syntax">prim_cat</span><span class="plain-syntax"> = </span><span class="identifier-syntax">VAL_PRIM_CAT</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">VH</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">vhmode_wanted</span><span class="plain-syntax"> != </span><span class="constant-syntax">INTER_VOID_VHMODE</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">internal_error</span><span class="plain-syntax">(</span><span class="string-syntax">"must emit schemas in INTER_VAL_VHMODE or INTER_VOID_VHMODE"</span><span class="plain-syntax">);</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">inter_schema_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">node</span><span class="plain-syntax"> = </span><span class="identifier-syntax">sch</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">node_tree</span><span class="plain-syntax">; </span><span class="identifier-syntax">node</span><span class="plain-syntax">; </span><span class="identifier-syntax">node</span><span class="plain-syntax">=</span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">EIS_RECURSE</span><span class="plain-syntax">(</span><span class="identifier-syntax">node</span><span class="plain-syntax">, </span><span class="identifier-syntax">prim_cat</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP1">&#167;1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP3" class="paragraph-anchor"></a><b>&#167;3. </b>As noted, this is very much a recursive function, but it does not automatically
recurse downwards: that depends on what is done at given nodes.
</p>

<p class="commentary">In particular, no children of blocked nodes &mdash; those removed by conditional
compilation &mdash; are ever visited.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">EmitInterSchemas::emit_recursively</span><button class="popup" onclick="togglePopup('usagePopup2')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup2">Usage of <span class="code-font"><span class="function-syntax">EmitInterSchemas::emit_recursively</span></span>:<br/><a href="2-eis.html#SP1_3">&#167;1.3</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">inter_tree</span><span class="plain-syntax"> *</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="reserved-syntax">inter_schema_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">node</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">value_holster</span><span class="plain-syntax"> *</span><span class="identifier-syntax">VH</span><span class="plain-syntax">, </span><span class="reserved-syntax">inter_schema</span><span class="plain-syntax"> *</span><span class="identifier-syntax">sch</span><span class="plain-syntax">, </span><span class="reserved-syntax">void</span><span class="plain-syntax"> *</span><span class="identifier-syntax">opaque_state</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">prim_cat</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">identifier_finder</span><span class="plain-syntax"> </span><span class="identifier-syntax">finder</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">void</span><span class="plain-syntax"> (*</span><span class="identifier-syntax">inline_command_handler</span><span class="plain-syntax">)(</span><span class="reserved-syntax">value_holster</span><span class="plain-syntax"> *</span><span class="identifier-syntax">VH</span><span class="plain-syntax">, </span><span class="reserved-syntax">inter_schema_token</span><span class="plain-syntax"> *</span><span class="identifier-syntax">t</span><span class="plain-syntax">,</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">void</span><span class="plain-syntax"> *</span><span class="identifier-syntax">opaque_state</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">prim_cat</span><span class="plain-syntax">, </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">L</span><span class="plain-syntax">),</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">void</span><span class="plain-syntax"> (*</span><span class="identifier-syntax">i7_source_handler</span><span class="plain-syntax">)(</span><span class="reserved-syntax">value_holster</span><span class="plain-syntax"> *</span><span class="identifier-syntax">VH</span><span class="plain-syntax">, </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">S</span><span class="plain-syntax">,</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">void</span><span class="plain-syntax"> *</span><span class="identifier-syntax">opaque_state</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">prim_cat</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">node</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">blocked_by_conditional</span><span class="plain-syntax"> == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">))</span>
<span class="plain-syntax">        </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP3_1" class="named-paragraph-link"><span class="named-paragraph">Emit code for this unblocked node</span><span class="named-paragraph-number">3.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP3_1" class="paragraph-anchor"></a><b>&#167;3.1. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Emit code for this unblocked node</span><span class="named-paragraph-number">3.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">switch</span><span class="plain-syntax"> (</span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">isn_type</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">ASSEMBLY_ISNT:</span><span class="plain-syntax"> </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP3_1_1" class="named-paragraph-link"><span class="named-paragraph">Assembly</span><span class="named-paragraph-number">3.1.1</span></a></span><span class="plain-syntax">; </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">CALL_ISNT:</span><span class="plain-syntax"> </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP3_1_2" class="named-paragraph-link"><span class="named-paragraph">Call</span><span class="named-paragraph-number">3.1.2</span></a></span><span class="plain-syntax">; </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">CALLMESSAGE_ISNT:</span><span class="plain-syntax"> </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP3_1_3" class="named-paragraph-link"><span class="named-paragraph">Call-message</span><span class="named-paragraph-number">3.1.3</span></a></span><span class="plain-syntax">; </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">CODE_ISNT:</span><span class="plain-syntax"> </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP3_1_4" class="named-paragraph-link"><span class="named-paragraph">Code block</span><span class="named-paragraph-number">3.1.4</span></a></span><span class="plain-syntax">; </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">DIRECTIVE_ISNT:</span><span class="plain-syntax"> </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP3_1_5" class="named-paragraph-link"><span class="named-paragraph">Non-conditional directive</span><span class="named-paragraph-number">3.1.5</span></a></span><span class="plain-syntax">; </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">EVAL_ISNT:</span><span class="plain-syntax"> </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP3_1_6" class="named-paragraph-link"><span class="named-paragraph">Eval block</span><span class="named-paragraph-number">3.1.6</span></a></span><span class="plain-syntax">; </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">EXPRESSION_ISNT:</span><span class="plain-syntax"> </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP3_1_7" class="named-paragraph-link"><span class="named-paragraph">Expression</span><span class="named-paragraph-number">3.1.7</span></a></span><span class="plain-syntax">; </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">LABEL_ISNT:</span><span class="plain-syntax"> </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP3_1_8" class="named-paragraph-link"><span class="named-paragraph">Label</span><span class="named-paragraph-number">3.1.8</span></a></span><span class="plain-syntax">; </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">MESSAGE_ISNT:</span><span class="plain-syntax"> </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP3_1_9" class="named-paragraph-link"><span class="named-paragraph">Message</span><span class="named-paragraph-number">3.1.9</span></a></span><span class="plain-syntax">; </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">OPERATION_ISNT:</span><span class="plain-syntax"> </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP3_1_10" class="named-paragraph-link"><span class="named-paragraph">Operation</span><span class="named-paragraph-number">3.1.10</span></a></span><span class="plain-syntax">; </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">STATEMENT_ISNT:</span><span class="plain-syntax"> </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP3_1_11" class="named-paragraph-link"><span class="named-paragraph">Statement</span><span class="named-paragraph-number">3.1.11</span></a></span><span class="plain-syntax">; </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">SUBEXPRESSION_ISNT:</span><span class="plain-syntax"> </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP3_1_12" class="named-paragraph-link"><span class="named-paragraph">Subexpression</span><span class="named-paragraph-number">3.1.12</span></a></span><span class="plain-syntax">; </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">default:</span><span class="plain-syntax"> </span><span class="identifier-syntax">internal_error</span><span class="plain-syntax">(</span><span class="string-syntax">"unknown schema node type"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP3">&#167;3</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP3_1_1" class="paragraph-anchor"></a><b>&#167;3.1.1. </b>Assembly language can only appear in <span class="extract"><span class="extract-syntax">CODE_PRIM_CAT</span></span> mode and looks like so:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="constant-syntax">ASSEMBLY_ISNT</span>
<span class="plain-syntax">        </span><span class="constant-syntax">EXPRESSION_ISNT</span>
<span class="plain-syntax">            </span><span class="constant-syntax">OPCODE_ISTT</span><span class="plain-syntax"> </span><span class="string-syntax">"@mul"</span>
<span class="plain-syntax">        </span><span class="constant-syntax">EXPRESSION_ISNT</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">x</span>
<span class="plain-syntax">        </span><span class="constant-syntax">EXPRESSION_ISNT</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">y</span>
<span class="plain-syntax">        </span><span class="constant-syntax">EXPRESSION_ISNT</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">z</span>
</pre>
<p class="commentary">Note that recursion in <span class="extract"><span class="extract-syntax">VAL_PRIM_CAT</span></span> mode evaluates <span class="extract"><span class="extract-syntax">x</span></span>, <span class="extract"><span class="extract-syntax">y</span></span> and <span class="extract"><span class="extract-syntax">z</span></span>.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Assembly</span><span class="named-paragraph-number">3.1.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">prim_cat</span><span class="plain-syntax"> != </span><span class="identifier-syntax">CODE_PRIM_CAT</span><span class="plain-syntax">) { </span><span class="comment-syntax"> should never in fact happen</span>
<span class="plain-syntax">        </span><a href="2-i6se.html#SP4" class="function-link"><span class="function-syntax">I6Errors::issue_at_node</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">node</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"assembly language unexpected here"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_schema_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">at</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">opcode_text</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">isn_type</span><span class="plain-syntax"> == </span><span class="constant-syntax">EXPRESSION_ISNT</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">inter_schema_token</span><span class="plain-syntax"> *</span><span class="identifier-syntax">tok</span><span class="plain-syntax"> = </span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">expression_tokens</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">tok</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">ist_type</span><span class="plain-syntax"> == </span><span class="constant-syntax">OPCODE_ISTT</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">tok</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">))</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">opcode_text</span><span class="plain-syntax"> = </span><span class="identifier-syntax">tok</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">opcode_text</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) { </span><span class="comment-syntax"> should never in fact happen</span>
<span class="plain-syntax">            </span><a href="2-i6se.html#SP4" class="function-link"><span class="function-syntax">I6Errors::issue_at_node</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">node</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"assembly language malformed here"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><a href="3-prd.html#SP26" class="function-link"><span class="function-syntax">Produce::inv_assembly</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">opcode_text</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::down</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">; </span><span class="identifier-syntax">at</span><span class="plain-syntax">; </span><span class="identifier-syntax">at</span><span class="plain-syntax">=</span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">)</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">EIS_RECURSE</span><span class="plain-syntax">(</span><span class="identifier-syntax">at</span><span class="plain-syntax">, </span><span class="identifier-syntax">VAL_PRIM_CAT</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::up</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP3_1">&#167;3.1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP3_1_2" class="paragraph-anchor"></a><b>&#167;3.1.2. </b>What looks syntactically like a function call may in Inform 6 be a use of
one of the "built-in functions" &mdash; for example, <span class="extract"><span class="extract-syntax">y = child(O)</span></span>. But it is not
in fact a function, in the traditional Inform 6 implementation, at least;
and it is not legal to perform, say, <span class="extract"><span class="extract-syntax">x = child; y = indirect(x, O);</span></span>
because <span class="extract"><span class="extract-syntax">child</span></span>, not really being a function, has no address.
</p>

<p class="commentary">The design of Inter has gone back and forth over whether to make these Inter
functions in order to simplify the picture. But if so, they are a nuisance in
linking, it turns out, and so where we have ended up is that the I6 "built-in
functions" are implemented by Inter primitives. It follows that a function
call to them must be compiled as a special case.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Call</span><span class="named-paragraph-number">3.1.2</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_schema_token</span><span class="plain-syntax"> *</span><span class="identifier-syntax">external_tok</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_schema_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">to_call</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">bip_for_builtin_fn</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">isn_type</span><span class="plain-syntax"> == </span><span class="constant-syntax">EXPRESSION_ISNT</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">inter_schema_token</span><span class="plain-syntax"> *</span><span class="identifier-syntax">tok</span><span class="plain-syntax"> = </span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">expression_tokens</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">tok</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">ist_type</span><span class="plain-syntax"> == </span><span class="constant-syntax">IDENTIFIER_ISTT</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">tok</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">))</span>
<span class="plain-syntax">                </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP3_1_2_1" class="named-paragraph-link"><span class="named-paragraph">Work out what function or primitive to call or invoke</span><span class="named-paragraph-number">3.1.2.1</span></a></span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP3_1_2_2" class="named-paragraph-link"><span class="named-paragraph">Compile the invocation</span><span class="named-paragraph-number">3.1.2.2</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::down</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (; </span><span class="identifier-syntax">at</span><span class="plain-syntax">; </span><span class="identifier-syntax">at</span><span class="plain-syntax">=</span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">) </span><span class="identifier-syntax">EIS_RECURSE</span><span class="plain-syntax">(</span><span class="identifier-syntax">at</span><span class="plain-syntax">, </span><span class="identifier-syntax">VAL_PRIM_CAT</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::up</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">external_tok</span><span class="plain-syntax">) </span><span class="identifier-syntax">external_tok</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">ist_type</span><span class="plain-syntax"> = </span><span class="constant-syntax">IDENTIFIER_ISTT</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP3_1">&#167;3.1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP3_1_2_1" class="paragraph-anchor"></a><b>&#167;3.1.2.1. </b>Inform 6 syntax is surprisingly liberal in what it allows as a function call,
and the <span class="extract"><span class="extract-syntax">f</span></span> in <span class="extract"><span class="extract-syntax">f(x)</span></span> does not have to be a function name; it can be a variable,
for example, holding the address of a function.
</p>

<p class="commentary">In the following, <span class="extract"><span class="extract-syntax">to_call</span></span> should be set to the <span class="extract"><span class="extract-syntax">inter_symbol</span></span> for the function
to call, if the function is literally named; or <span class="extract"><span class="extract-syntax">bip_for_builtin_fn</span></span> should be
set to the primitive to invoke instead; and otherwise an indirect function call
to an address will be compiled.
</p>

<p class="commentary">With one exception: the <span class="extract"><span class="extract-syntax">external__f(x)</span></span> notation, which does not occur in I6,
but permits function calls outside of the target environment. See
<a href="../inform7/M-cifc.html" class="internal">Calling Inform from C (in inform7)</a> for more on this. Note that although the
code here appears to amend the schema by changing a token type, it is in fact
changed back again very soon after.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Work out what function or primitive to call or invoke</span><span class="named-paragraph-number">3.1.2.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::prefix_eq</span><span class="plain-syntax">(</span><span class="identifier-syntax">tok</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"external__"</span><span class="plain-syntax">, </span><span class="constant-syntax">10</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">external_tok</span><span class="plain-syntax"> = </span><span class="identifier-syntax">tok</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">bip_for_builtin_fn</span><span class="plain-syntax"> = </span><span class="constant-syntax">EXTERNALCALL_BIP</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">external_tok</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">ist_type</span><span class="plain-syntax"> = </span><span class="constant-syntax">DQUOTED_ISTT</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::eq</span><span class="plain-syntax">(</span><span class="identifier-syntax">tok</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"random"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">bip_for_builtin_fn</span><span class="plain-syntax"> = </span><span class="constant-syntax">RANDOM_BIP</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::eq</span><span class="plain-syntax">(</span><span class="identifier-syntax">tok</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"child"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">bip_for_builtin_fn</span><span class="plain-syntax"> = </span><span class="constant-syntax">CHILD_BIP</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::eq</span><span class="plain-syntax">(</span><span class="identifier-syntax">tok</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"children"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">bip_for_builtin_fn</span><span class="plain-syntax"> = </span><span class="constant-syntax">CHILDREN_BIP</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::eq</span><span class="plain-syntax">(</span><span class="identifier-syntax">tok</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"parent"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">bip_for_builtin_fn</span><span class="plain-syntax"> = </span><span class="constant-syntax">PARENT_BIP</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::eq</span><span class="plain-syntax">(</span><span class="identifier-syntax">tok</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"sibling"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">bip_for_builtin_fn</span><span class="plain-syntax"> = </span><span class="constant-syntax">SIBLING_BIP</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::eq</span><span class="plain-syntax">(</span><span class="identifier-syntax">tok</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"metaclass"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">bip_for_builtin_fn</span><span class="plain-syntax"> = </span><span class="constant-syntax">METACLASS_BIP</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::eq</span><span class="plain-syntax">(</span><span class="identifier-syntax">tok</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"indirect"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::eq</span><span class="plain-syntax">(</span><span class="identifier-syntax">tok</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"glk"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><a href="2-i6se.html#SP4" class="function-link"><span class="function-syntax">I6Errors::issue_at_node</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">node</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"the glk() function is now unsupported"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">to_call</span><span class="plain-syntax"> = </span><a href="2-if.html#SP6" class="function-link"><span class="function-syntax">IdentifierFinders::find_token</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">tok</span><span class="plain-syntax">, </span><span class="identifier-syntax">finder</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">InterSymbol::is_local</span><span class="plain-syntax">(</span><span class="identifier-syntax">to_call</span><span class="plain-syntax">)) </span><span class="identifier-syntax">to_call</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">to_call</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">inter_tree_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">D</span><span class="plain-syntax"> = </span><span class="identifier-syntax">to_call</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">definition</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Inode::is</span><span class="plain-syntax">(</span><span class="identifier-syntax">D</span><span class="plain-syntax">, </span><span class="identifier-syntax">VARIABLE_IST</span><span class="plain-syntax">)) </span><span class="identifier-syntax">to_call</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP3_1_2">&#167;3.1.2</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP3_1_2_2" class="paragraph-anchor"></a><b>&#167;3.1.2.2. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Compile the invocation</span><span class="named-paragraph-number">3.1.2.2</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">bip_for_builtin_fn</span><span class="plain-syntax"> &gt; </span><span class="constant-syntax">0</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><a href="3-prd.html#SP24" class="function-link"><span class="function-syntax">Produce::inv_primitive</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">bip_for_builtin_fn</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">to_call</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><a href="3-prd.html#SP28" class="function-link"><span class="function-syntax">Produce::inv_call_symbol</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">to_call</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">argc</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">inter_schema_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">n</span><span class="plain-syntax"> = </span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">; </span><span class="identifier-syntax">n</span><span class="plain-syntax">; </span><span class="identifier-syntax">n</span><span class="plain-syntax">=</span><span class="identifier-syntax">n</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">n</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">expression_tokens</span><span class="plain-syntax">) &amp;&amp;</span>
<span class="plain-syntax">                (</span><span class="identifier-syntax">n</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">expression_tokens</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">inline_command</span><span class="plain-syntax"> == </span><span class="constant-syntax">combine_ISINC</span><span class="plain-syntax">)) </span><span class="identifier-syntax">argc</span><span class="plain-syntax">++;</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">argc</span><span class="plain-syntax">++;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">BIP</span><span class="plain-syntax"> = </span><a href="1-ip.html#SP7" class="function-link"><span class="function-syntax">Primitives::BIP_for_indirect_call_returning_value</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">argc</span><span class="plain-syntax">-1);</span>
<span class="plain-syntax">        </span><a href="3-prd.html#SP24" class="function-link"><span class="function-syntax">Produce::inv_primitive</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">BIP</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP3_1_2">&#167;3.1.2</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP3_1_3" class="paragraph-anchor"></a><b>&#167;3.1.3. </b>This is really a simplified version of the "call" case, where we know that
we have to perform indirection, i.e., call a function whose address is stored
somewhere (in fact, always in a property value).
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Call-message</span><span class="named-paragraph-number">3.1.3</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_schema_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">argc</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">inter_schema_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">n</span><span class="plain-syntax"> = </span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">; </span><span class="identifier-syntax">n</span><span class="plain-syntax">; </span><span class="identifier-syntax">n</span><span class="plain-syntax">=</span><span class="identifier-syntax">n</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">) </span><span class="identifier-syntax">argc</span><span class="plain-syntax">++;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">argc</span><span class="plain-syntax"> &gt; </span><span class="constant-syntax">4</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><a href="2-i6se.html#SP4" class="function-link"><span class="function-syntax">I6Errors::issue_at_node</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">node</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"too many arguments for call-message"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">BIP</span><span class="plain-syntax"> = </span><a href="1-ip.html#SP7" class="function-link"><span class="function-syntax">Primitives::BIP_for_indirect_call_returning_value</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">argc</span><span class="plain-syntax">-1);</span>
<span class="plain-syntax">        </span><a href="3-prd.html#SP24" class="function-link"><span class="function-syntax">Produce::inv_primitive</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">BIP</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::down</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (; </span><span class="identifier-syntax">at</span><span class="plain-syntax">; </span><span class="identifier-syntax">at</span><span class="plain-syntax">=</span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">) </span><span class="identifier-syntax">EIS_RECURSE</span><span class="plain-syntax">(</span><span class="identifier-syntax">at</span><span class="plain-syntax">, </span><span class="identifier-syntax">VAL_PRIM_CAT</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::up</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP3_1">&#167;3.1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP3_1_4" class="paragraph-anchor"></a><b>&#167;3.1.4. </b>Note that inter schemas can contain code blocks which are half-open at either
end, and this enables some fruity Inform 7 inline phrase definitions. So the
following can generate the equivalent of <span class="extract"><span class="extract-syntax">{ ...</span></span>  or <span class="extract"><span class="extract-syntax">... }</span></span> as well as the
more natural <span class="extract"><span class="extract-syntax">{ ... }</span></span>.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Code block</span><span class="named-paragraph-number">3.1.4</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">prim_cat</span><span class="plain-syntax"> != </span><span class="identifier-syntax">CODE_PRIM_CAT</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><a href="2-i6se.html#SP4" class="function-link"><span class="function-syntax">I6Errors::issue_at_node</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">node</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"unexpected '{ ... }' code block"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">unopened</span><span class="plain-syntax"> == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><a href="3-prd.html#SP29" class="function-link"><span class="function-syntax">Produce::code</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::down</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">inter_schema_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">; </span><span class="identifier-syntax">at</span><span class="plain-syntax">; </span><span class="identifier-syntax">at</span><span class="plain-syntax">=</span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">EIS_RECURSE</span><span class="plain-syntax">(</span><span class="identifier-syntax">at</span><span class="plain-syntax">, </span><span class="identifier-syntax">CODE_PRIM_CAT</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">unclosed</span><span class="plain-syntax"> == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::up</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">unopened</span><span class="plain-syntax">) </span><a href="3-prd.html#SP10" class="function-link"><span class="function-syntax">Produce::set_level_to_current_code_block_plus</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP3_1">&#167;3.1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP3_1_5" class="paragraph-anchor"></a><b>&#167;3.1.5. </b>Note that conditional directives have already been taken care of. The
only other Inform 6 directive valid inside a function body is OrigSource.
Therefore:
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Non-conditional directive</span><span class="named-paragraph-number">3.1.5</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">dir_clarifier</span><span class="plain-syntax"> == </span><span class="constant-syntax">ORIGSOURCE_I6RW</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP3_1_5_1" class="named-paragraph-link"><span class="named-paragraph">OrigSource directive</span><span class="named-paragraph-number">3.1.5.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><a href="2-i6se.html#SP4" class="function-link"><span class="function-syntax">I6Errors::issue_at_node</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">node</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"misplaced directive"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP3_1">&#167;3.1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP3_1_5_1" class="paragraph-anchor"></a><b>&#167;3.1.5.1. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">OrigSource directive</span><span class="named-paragraph-number">3.1.5.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">origfilename</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">origlinenum</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">origfilename</span><span class="plain-syntax"> = </span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">expression_tokens</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">expression_tokens</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">origlinenum</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Str::atoi</span><span class="plain-syntax">(</span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">expression_tokens</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><a href="3-prd.html#SP40" class="function-link"><span class="function-syntax">Produce::provenance</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">Provenance::at_file_and_line</span><span class="plain-syntax">(</span><span class="identifier-syntax">origfilename</span><span class="plain-syntax">, </span><span class="identifier-syntax">origlinenum</span><span class="plain-syntax">));</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP3_1_5">&#167;3.1.5</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP3_1_6" class="paragraph-anchor"></a><b>&#167;3.1.6. </b>An <span class="extract"><span class="extract-syntax">EVAL_ISNT</span></span> node can have any number of children, they are sequentially
evaluated for their potential side-effects, but only the last produces a value.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Eval block</span><span class="named-paragraph-number">3.1.6</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">prim_cat</span><span class="plain-syntax"> != </span><span class="identifier-syntax">CODE_PRIM_CAT</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">prim_cat</span><span class="plain-syntax"> != </span><span class="identifier-syntax">VAL_PRIM_CAT</span><span class="plain-syntax">)){</span>
<span class="plain-syntax">        </span><a href="2-i6se.html#SP4" class="function-link"><span class="function-syntax">I6Errors::issue_at_node</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">node</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"expression in unexpected place"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><a href="3-prd.html#SP32" class="function-link"><span class="function-syntax">Produce::val</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">K_value</span><span class="plain-syntax">, </span><span class="identifier-syntax">InterValuePairs::number</span><span class="plain-syntax">(1));</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">d</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">inter_schema_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">; </span><span class="identifier-syntax">at</span><span class="plain-syntax">; </span><span class="identifier-syntax">at</span><span class="plain-syntax">=</span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">d</span><span class="plain-syntax">++;</span>
<span class="plain-syntax">                </span><a href="3-prd.html#SP24" class="function-link"><span class="function-syntax">Produce::inv_primitive</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="constant-syntax">SEQUENTIAL_BIP</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::down</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">EIS_RECURSE</span><span class="plain-syntax">(</span><span class="identifier-syntax">at</span><span class="plain-syntax">, </span><span class="identifier-syntax">VAL_PRIM_CAT</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">while</span><span class="plain-syntax"> (</span><span class="identifier-syntax">d</span><span class="plain-syntax"> &gt; </span><span class="constant-syntax">0</span><span class="plain-syntax">) { </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::up</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">); </span><span class="identifier-syntax">d</span><span class="plain-syntax">--; }</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP3_1">&#167;3.1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP3_1_7" class="paragraph-anchor"></a><b>&#167;3.1.7. </b>Note that an expression consisting only of a double-quoted text, in void
context, is a print-then-print-new-line-then-return-true statement in Inform 6.
This is where we detect that. (Because its meaning depends on context &mdash; i.e.,
it doesn't mean that in value context &mdash; we couldn't have decided this when
parsing the schema.)
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Expression</span><span class="named-paragraph-number">3.1.7</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">serial_evaluate_us</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">reference_me</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">print_ret_me</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP3_1_7_1" class="named-paragraph-link"><span class="named-paragraph">Decide whether exceptional expression modes apply</span><span class="named-paragraph-number">3.1.7.1</span></a></span><span class="plain-syntax">;</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">serial_evaluate_us</span><span class="plain-syntax">) { </span><a href="3-prd.html#SP29" class="function-link"><span class="function-syntax">Produce::evaluation</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">); </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::down</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">); }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">reference_me</span><span class="plain-syntax">) { </span><a href="3-prd.html#SP29" class="function-link"><span class="function-syntax">Produce::reference</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">); </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::down</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">); }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">print_ret_me</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><a href="3-prd.html#SP24" class="function-link"><span class="function-syntax">Produce::inv_primitive</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="constant-syntax">PRINT_BIP</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::down</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">inter_schema_token</span><span class="plain-syntax"> *</span><span class="identifier-syntax">t</span><span class="plain-syntax"> = </span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">expression_tokens</span><span class="plain-syntax">; </span><span class="identifier-syntax">t</span><span class="plain-syntax">; </span><span class="identifier-syntax">t</span><span class="plain-syntax">=</span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP3_1_7_2" class="named-paragraph-link"><span class="named-paragraph">Evaluate this token</span><span class="named-paragraph-number">3.1.7.2</span></a></span><span class="plain-syntax">;</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">print_ret_me</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::up</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-prd.html#SP24" class="function-link"><span class="function-syntax">Produce::inv_primitive</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="constant-syntax">PRINTNL_BIP</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-prd.html#SP25" class="function-link"><span class="function-syntax">Produce::rtrue</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">reference_me</span><span class="plain-syntax">) { </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::up</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">); }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">serial_evaluate_us</span><span class="plain-syntax">) { </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::up</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">); }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP3_1">&#167;3.1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP3_1_7_1" class="paragraph-anchor"></a><b>&#167;3.1.7.1. </b>Note that at most one of thexe exceptional cases can arise at a time.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Decide whether exceptional expression modes apply</span><span class="named-paragraph-number">3.1.7.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">evaluations_to_perform</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">inter_schema_token</span><span class="plain-syntax"> *</span><span class="identifier-syntax">t</span><span class="plain-syntax"> = </span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">expression_tokens</span><span class="plain-syntax">; </span><span class="identifier-syntax">t</span><span class="plain-syntax">; </span><span class="identifier-syntax">t</span><span class="plain-syntax">=</span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">evaluations_to_perform</span><span class="plain-syntax">++;</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">evaluations_to_perform</span><span class="plain-syntax"> &gt; </span><span class="constant-syntax">1</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">prim_cat</span><span class="plain-syntax"> == </span><span class="identifier-syntax">VAL_PRIM_CAT</span><span class="plain-syntax">) </span><span class="identifier-syntax">serial_evaluate_us</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">evaluations_to_perform</span><span class="plain-syntax"> == </span><span class="constant-syntax">1</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">prim_cat</span><span class="plain-syntax"> == </span><span class="identifier-syntax">CODE_PRIM_CAT</span><span class="plain-syntax">) &amp;&amp;</span>
<span class="plain-syntax">            (</span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">expression_tokens</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">ist_type</span><span class="plain-syntax"> == </span><span class="constant-syntax">DQUOTED_ISTT</span><span class="plain-syntax">))</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">print_ret_me</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">prim_cat</span><span class="plain-syntax"> == </span><span class="identifier-syntax">REF_PRIM_CAT</span><span class="plain-syntax">) </span><span class="identifier-syntax">reference_me</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP3_1_7">&#167;3.1.7</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP3_1_7_2" class="paragraph-anchor"></a><b>&#167;3.1.7.2. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Evaluate this token</span><span class="named-paragraph-number">3.1.7.2</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">switch</span><span class="plain-syntax"> (</span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">ist_type</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">IDENTIFIER_ISTT:</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">prim_cat</span><span class="plain-syntax"> == </span><span class="identifier-syntax">LAB_PRIM_CAT</span><span class="plain-syntax">)</span>
<span class="plain-syntax">                </span><a href="3-prd.html#SP38" class="function-link"><span class="function-syntax">Produce::lab</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><a href="3-prd.html#SP36" class="function-link"><span class="function-syntax">Produce::reserve_label</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">));</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">else</span>
<span class="plain-syntax">                </span><a href="3-prd.html#SP31" class="function-link"><span class="function-syntax">Produce::val_symbol</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">K_value</span><span class="plain-syntax">,</span>
<span class="plain-syntax">                    </span><a href="2-if.html#SP6" class="function-link"><span class="function-syntax">IdentifierFinders::find_token</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">t</span><span class="plain-syntax">, </span><span class="identifier-syntax">finder</span><span class="plain-syntax">));</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">ASM_ARROW_ISTT:</span>
<span class="plain-syntax">            </span><a href="3-prd.html#SP27" class="function-link"><span class="function-syntax">Produce::assembly_marker</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">ASM_ARROW_ASMMARKER</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">ASM_SP_ISTT:</span>
<span class="plain-syntax">            </span><a href="3-prd.html#SP27" class="function-link"><span class="function-syntax">Produce::assembly_marker</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">ASM_SP_ASMMARKER</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">ASM_NEGATED_LABEL_ISTT:</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::eq</span><span class="plain-syntax">(</span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"rtrue"</span><span class="plain-syntax">))</span>
<span class="plain-syntax">                </span><a href="3-prd.html#SP27" class="function-link"><span class="function-syntax">Produce::assembly_marker</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">ASM_NEG_RTRUE_ASMMARKER</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::eq</span><span class="plain-syntax">(</span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"rfalse"</span><span class="plain-syntax">))</span>
<span class="plain-syntax">                </span><a href="3-prd.html#SP27" class="function-link"><span class="function-syntax">Produce::assembly_marker</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">ASM_NEG_RFALSE_ASMMARKER</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">                </span><a href="3-prd.html#SP27" class="function-link"><span class="function-syntax">Produce::assembly_marker</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">ASM_NEG_ASMMARKER</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><a href="3-prd.html#SP38" class="function-link"><span class="function-syntax">Produce::lab</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><a href="3-prd.html#SP36" class="function-link"><span class="function-syntax">Produce::reserve_label</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">));</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">ASM_LABEL_ISTT:</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::eq</span><span class="plain-syntax">(</span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"rtrue"</span><span class="plain-syntax">))</span>
<span class="plain-syntax">                </span><a href="3-prd.html#SP27" class="function-link"><span class="function-syntax">Produce::assembly_marker</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">ASM_RTRUE_ASMMARKER</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::eq</span><span class="plain-syntax">(</span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"rfalse"</span><span class="plain-syntax">))</span>
<span class="plain-syntax">                </span><a href="3-prd.html#SP27" class="function-link"><span class="function-syntax">Produce::assembly_marker</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">ASM_RFALSE_ASMMARKER</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">else</span>
<span class="plain-syntax">                </span><a href="3-prd.html#SP38" class="function-link"><span class="function-syntax">Produce::lab</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><a href="3-prd.html#SP36" class="function-link"><span class="function-syntax">Produce::reserve_label</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">));</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">NUMBER_ISTT:</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">BIN_NUMBER_ISTT:</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">HEX_NUMBER_ISTT:</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">inter_pair</span><span class="plain-syntax"> </span><span class="identifier-syntax">val</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constant_number</span><span class="plain-syntax"> &gt;= </span><span class="constant-syntax">0</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">val</span><span class="plain-syntax"> = </span><span class="identifier-syntax">InterValuePairs::number</span><span class="plain-syntax">((</span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax">) </span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constant_number</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">overflow</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">val</span><span class="plain-syntax"> = </span><span class="identifier-syntax">InterValuePairs::number_from_I6_notation</span><span class="plain-syntax">(</span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">, &amp;</span><span class="identifier-syntax">overflow</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">InterValuePairs::is_undef</span><span class="plain-syntax">(</span><span class="identifier-syntax">val</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">msg</span><span class="plain-syntax">)</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">overflow</span><span class="plain-syntax">) </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">msg</span><span class="plain-syntax">, </span><span class="string-syntax">"literal number '%S' too large"</span><span class="plain-syntax">, </span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">msg</span><span class="plain-syntax">, </span><span class="string-syntax">"malformed literal number '%S'"</span><span class="plain-syntax">, </span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                    </span><a href="2-i6se.html#SP4" class="function-link"><span class="function-syntax">I6Errors::issue_at_node</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">node</span><span class="plain-syntax">, </span><span class="identifier-syntax">msg</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">msg</span><span class="plain-syntax">)</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                }</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><a href="3-prd.html#SP32" class="function-link"><span class="function-syntax">Produce::val</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">K_value</span><span class="plain-syntax">, </span><span class="identifier-syntax">val</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">REAL_NUMBER_ISTT:</span>
<span class="plain-syntax">            </span><a href="3-prd.html#SP33" class="function-link"><span class="function-syntax">Produce::val_real_from_text</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">DQUOTED_ISTT:</span>
<span class="plain-syntax">            </span><a href="3-prd.html#SP33" class="function-link"><span class="function-syntax">Produce::val_text</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">SQUOTED_ISTT:</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::len</span><span class="plain-syntax">(</span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">) == </span><span class="constant-syntax">1</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                </span><a href="3-prd.html#SP33" class="function-link"><span class="function-syntax">Produce::val_char</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">Str::get_at</span><span class="plain-syntax">(</span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">));</span>
<span class="plain-syntax">            } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">                </span><a href="3-prd.html#SP33" class="function-link"><span class="function-syntax">Produce::val_dword</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">I7_ISTT:</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">i7_source_handler</span><span class="plain-syntax">)</span>
<span class="plain-syntax">                (*</span><span class="identifier-syntax">i7_source_handler</span><span class="plain-syntax">)(</span><span class="identifier-syntax">VH</span><span class="plain-syntax">, </span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">, </span><span class="identifier-syntax">opaque_state</span><span class="plain-syntax">, </span><span class="identifier-syntax">prim_cat</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">INLINE_ISTT:</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">inline_command_handler</span><span class="plain-syntax">)</span>
<span class="plain-syntax">                (*</span><span class="identifier-syntax">inline_command_handler</span><span class="plain-syntax">)(</span><span class="identifier-syntax">VH</span><span class="plain-syntax">, </span><span class="identifier-syntax">t</span><span class="plain-syntax">, </span><span class="identifier-syntax">opaque_state</span><span class="plain-syntax">, </span><span class="identifier-syntax">prim_cat</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">default:</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">msg</span><span class="plain-syntax">)</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">msg</span><span class="plain-syntax">, </span><span class="string-syntax">"'%S' was unexpected in expression context"</span><span class="plain-syntax">, </span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><a href="2-i6se.html#SP4" class="function-link"><span class="function-syntax">I6Errors::issue_at_node</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">node</span><span class="plain-syntax">, </span><span class="identifier-syntax">msg</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">msg</span><span class="plain-syntax">)</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP3_1_7">&#167;3.1.7</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP3_1_8" class="paragraph-anchor"></a><b>&#167;3.1.8. </b>A twig for a label, such as:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="constant-syntax">LABEL_ISNT</span>
<span class="plain-syntax">        </span><span class="constant-syntax">EXPRESSION_ISNT</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">MyLabel</span>
</pre>
<p class="commentary">This places the label <span class="extract"><span class="extract-syntax">MyLabel</span></span> at the current write position.
</p>

<p class="commentary">What makes this more complicated is that an inline command might be being used
to determine the name of that label, and/or to amend a label numbering counter.
For example, the schema <span class="extract"><span class="extract-syntax">.{-label:Say}{-counter-up:Say};</span></span> results in:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="constant-syntax">LABEL_ISNT</span>
<span class="plain-syntax">        </span><span class="constant-syntax">EXPRESSION_ISNT</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">INLINE_ISNT</span><span class="plain-syntax"> = </span><span class="identifier-syntax">label:Say</span>
<span class="plain-syntax">        </span><span class="constant-syntax">EXPRESSION_ISNT</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">INLINE_ISNT</span><span class="plain-syntax"> = </span><span class="identifier-syntax">counter</span><span class="plain-syntax">-</span><span class="identifier-syntax">up:Say</span>
</pre>
<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Label</span><span class="named-paragraph-number">3.1.8</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">prim_cat</span><span class="plain-syntax"> != </span><span class="identifier-syntax">CODE_PRIM_CAT</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><a href="2-i6se.html#SP4" class="function-link"><span class="function-syntax">I6Errors::issue_at_node</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">node</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"label in unexpected place"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">L</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">L</span><span class="plain-syntax">, </span><span class="string-syntax">"."</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">inter_schema_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">; </span><span class="identifier-syntax">at</span><span class="plain-syntax">; </span><span class="identifier-syntax">at</span><span class="plain-syntax">=</span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">inter_schema_token</span><span class="plain-syntax"> *</span><span class="identifier-syntax">t</span><span class="plain-syntax"> = </span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">expression_tokens</span><span class="plain-syntax">; </span><span class="identifier-syntax">t</span><span class="plain-syntax">; </span><span class="identifier-syntax">t</span><span class="plain-syntax">=</span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">ist_type</span><span class="plain-syntax"> == </span><span class="constant-syntax">IDENTIFIER_ISTT</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">L</span><span class="plain-syntax">, </span><span class="string-syntax">"%S"</span><span class="plain-syntax">, </span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">ist_type</span><span class="plain-syntax"> == </span><span class="constant-syntax">INLINE_ISTT</span><span class="plain-syntax">) &amp;&amp;</span>
<span class="plain-syntax">                    ((</span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">inline_command</span><span class="plain-syntax"> == </span><span class="constant-syntax">label_ISINC</span><span class="plain-syntax">) ||</span>
<span class="plain-syntax">                     (</span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">inline_command</span><span class="plain-syntax"> == </span><span class="constant-syntax">counter_up_ISINC</span><span class="plain-syntax">) ||</span>
<span class="plain-syntax">                     (</span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">inline_command</span><span class="plain-syntax"> == </span><span class="constant-syntax">counter_down_ISINC</span><span class="plain-syntax">))) {</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">value_holster</span><span class="plain-syntax"> </span><span class="identifier-syntax">VN</span><span class="plain-syntax"> = </span><a href="3-vh.html#SP2" class="function-link"><span class="function-syntax">Holsters::new</span></a><span class="plain-syntax">(</span><span class="constant-syntax">INTER_DATA_VHMODE</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">inline_command_handler</span><span class="plain-syntax">)</span>
<span class="plain-syntax">                    (*</span><span class="identifier-syntax">inline_command_handler</span><span class="plain-syntax">)(&amp;</span><span class="identifier-syntax">VN</span><span class="plain-syntax">, </span><span class="identifier-syntax">t</span><span class="plain-syntax">, </span><span class="identifier-syntax">opaque_state</span><span class="plain-syntax">, </span><span class="identifier-syntax">VAL_PRIM_CAT</span><span class="plain-syntax">, </span><span class="identifier-syntax">L</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">msg</span><span class="plain-syntax">)</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">msg</span><span class="plain-syntax">, </span><span class="string-syntax">"expected label name but found '%S'"</span><span class="plain-syntax">, </span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">material</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><a href="2-i6se.html#SP4" class="function-link"><span class="function-syntax">I6Errors::issue_at_node</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">node</span><span class="plain-syntax">, </span><span class="identifier-syntax">msg</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">msg</span><span class="plain-syntax">)</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><a href="3-prd.html#SP37" class="function-link"><span class="function-syntax">Produce::place_label</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><a href="3-prd.html#SP36" class="function-link"><span class="function-syntax">Produce::reserve_label</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">L</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">L</span><span class="plain-syntax">)</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP3_1">&#167;3.1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP3_1_9" class="paragraph-anchor"></a><b>&#167;3.1.9. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Message</span><span class="named-paragraph-number">3.1.9</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_schema_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">at</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">argc</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">inter_schema_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">n</span><span class="plain-syntax"> = </span><span class="identifier-syntax">at</span><span class="plain-syntax">; </span><span class="identifier-syntax">n</span><span class="plain-syntax">; </span><span class="identifier-syntax">n</span><span class="plain-syntax">=</span><span class="identifier-syntax">n</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">) </span><span class="identifier-syntax">argc</span><span class="plain-syntax">++;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">BIP</span><span class="plain-syntax"> = </span><a href="1-ip.html#SP7" class="function-link"><span class="function-syntax">Primitives::BIP_for_message_send</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">argc</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-prd.html#SP24" class="function-link"><span class="function-syntax">Produce::inv_primitive</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">BIP</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::down</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (; </span><span class="identifier-syntax">at</span><span class="plain-syntax">; </span><span class="identifier-syntax">at</span><span class="plain-syntax">=</span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">) </span><span class="identifier-syntax">EIS_RECURSE</span><span class="plain-syntax">(</span><span class="identifier-syntax">at</span><span class="plain-syntax">, </span><span class="identifier-syntax">VAL_PRIM_CAT</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::up</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP3_1">&#167;3.1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP3_1_10" class="paragraph-anchor"></a><b>&#167;3.1.10. </b>Note the three pseudo-operations here &mdash; that is, operators which do not
directly correspond to Inter primitives. They are:
</p>

<ul class="items"><li>&#9679; <span class="extract"><span class="extract-syntax">HAS_XBIP</span></span>, which is done by performing a property lookup;
</li><li>&#9679; <span class="extract"><span class="extract-syntax">HASNT_XBIP</span></span>, which is done by negating the same;
</li><li>&#9679; <span class="extract"><span class="extract-syntax">OWNERKIND_XBIP</span></span>, which is a way to finesse that <span class="extract"><span class="extract-syntax">PROPERTYVALUE_BIP</span></span> is
ternary at the Inter level, but only binary in Inform 6 source code. When
the code writes <span class="extract"><span class="extract-syntax">obj.prop</span></span>, this is treated here as if it had been
<span class="extract"><span class="extract-syntax">OBJECT_TY&gt;&gt;obj.prop</span></span>; so the value <span class="extract"><span class="extract-syntax">OBJECT_TY</span></span> is dropped in. But if the
author had written <span class="extract"><span class="extract-syntax">K&gt;&gt;obj.prop</span></span> &mdash; giving the full ternary form &mdash; we
suppress the <span class="extract"><span class="extract-syntax">&gt;&gt;</span></span> operator and take <span class="extract"><span class="extract-syntax">K</span></span>, <span class="extract"><span class="extract-syntax">obj</span></span>, <span class="extract"><span class="extract-syntax">prop</span></span> as the three arguments
to the primitive <span class="extract"><span class="extract-syntax">PROPERTYVALUE_BIP</span></span>. (<span class="extract"><span class="extract-syntax">&gt;&gt;</span></span> has no other purpose or use, and
is not present in standard Inform 6 syntax.)
</li></ul>
<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Operation</span><span class="named-paragraph-number">3.1.10</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">op</span><span class="plain-syntax"> = </span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">isn_clarifier</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">op</span><span class="plain-syntax"> == </span><span class="constant-syntax">HAS_XBIP</span><span class="plain-syntax">) || (</span><span class="identifier-syntax">op</span><span class="plain-syntax"> == </span><span class="constant-syntax">HASNT_XBIP</span><span class="plain-syntax">)) </span><span class="identifier-syntax">op</span><span class="plain-syntax"> = </span><span class="constant-syntax">PROPERTYVALUE_BIP</span><span class="plain-syntax">;</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">reference_me</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">negate_me</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">insert_OBJECT_TY</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">nop_me</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP3_1_10_1" class="named-paragraph-link"><span class="named-paragraph">Decide whether exceptional operator modes apply</span><span class="named-paragraph-number">3.1.10.1</span></a></span><span class="plain-syntax">;</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">reference_me</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><a href="3-prd.html#SP29" class="function-link"><span class="function-syntax">Produce::reference</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::down</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">negate_me</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><a href="3-prd.html#SP24" class="function-link"><span class="function-syntax">Produce::inv_primitive</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="constant-syntax">NOT_BIP</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::down</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">nop_me</span><span class="plain-syntax"> == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><a href="3-prd.html#SP24" class="function-link"><span class="function-syntax">Produce::inv_primitive</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">op</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::down</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP3_1_10_2" class="named-paragraph-link"><span class="named-paragraph">Operands</span><span class="named-paragraph-number">3.1.10.2</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">nop_me</span><span class="plain-syntax"> == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) { </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::up</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">); }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">negate_me</span><span class="plain-syntax">) { </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::up</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">); }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">reference_me</span><span class="plain-syntax">) { </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::up</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">); }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP3_1">&#167;3.1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP3_1_10_1" class="paragraph-anchor"></a><b>&#167;3.1.10.1. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Decide whether exceptional operator modes apply</span><span class="named-paragraph-number">3.1.10.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">prim_cat</span><span class="plain-syntax"> == </span><span class="identifier-syntax">REF_PRIM_CAT</span><span class="plain-syntax">) </span><span class="identifier-syntax">reference_me</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">isn_clarifier</span><span class="plain-syntax"> == </span><span class="constant-syntax">HASNT_XBIP</span><span class="plain-syntax">) </span><span class="identifier-syntax">negate_me</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">op</span><span class="plain-syntax"> == </span><span class="constant-syntax">PROPERTYEXISTS_BIP</span><span class="plain-syntax">) || (</span><span class="identifier-syntax">op</span><span class="plain-syntax"> == </span><span class="constant-syntax">PROPERTYVALUE_BIP</span><span class="plain-syntax">) ||</span>
<span class="plain-syntax">        (</span><span class="identifier-syntax">op</span><span class="plain-syntax"> == </span><span class="constant-syntax">PROPERTYARRAY_BIP</span><span class="plain-syntax">) || (</span><span class="identifier-syntax">op</span><span class="plain-syntax"> == </span><span class="constant-syntax">PROPERTYLENGTH_BIP</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">isn_type</span><span class="plain-syntax"> != </span><span class="constant-syntax">OPERATION_ISNT</span><span class="plain-syntax">) ||</span>
<span class="plain-syntax">            (</span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">isn_clarifier</span><span class="plain-syntax"> != </span><span class="constant-syntax">OWNERKIND_XBIP</span><span class="plain-syntax">))</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">insert_OBJECT_TY</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">op</span><span class="plain-syntax"> == </span><span class="constant-syntax">OWNERKIND_XBIP</span><span class="plain-syntax">) </span><span class="identifier-syntax">nop_me</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP3_1_10">&#167;3.1.10</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP3_1_10_2" class="paragraph-anchor"></a><b>&#167;3.1.10.2. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Operands</span><span class="named-paragraph-number">3.1.10.2</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">insert_OBJECT_TY</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">OBJECT_TY_s</span><span class="plain-syntax"> =</span>
<span class="plain-syntax">            </span><a href="2-if.html#SP5" class="function-link"><span class="function-syntax">IdentifierFinders::find</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"OBJECT_TY"</span><span class="plain-syntax">, </span><span class="identifier-syntax">finder</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-prd.html#SP31" class="function-link"><span class="function-syntax">Produce::val_symbol</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">K_value</span><span class="plain-syntax">, </span><span class="identifier-syntax">OBJECT_TY_s</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">pc</span><span class="plain-syntax"> = </span><span class="identifier-syntax">VAL_PRIM_CAT</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="1-ip.html#SP10" class="function-link"><span class="function-syntax">Primitives::term_category</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">isn_clarifier</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">) == </span><span class="identifier-syntax">REF_PRIM_CAT</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">pc</span><span class="plain-syntax"> = </span><span class="identifier-syntax">REF_PRIM_CAT</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">EIS_RECURSE</span><span class="plain-syntax">(</span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">, </span><span class="identifier-syntax">pc</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="2-i6o.html#SP7" class="function-link"><span class="function-syntax">I6Operators::arity</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">isn_clarifier</span><span class="plain-syntax">) == </span><span class="constant-syntax">2</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">EIS_RECURSE</span><span class="plain-syntax">(</span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">, </span><span class="identifier-syntax">VAL_PRIM_CAT</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP3_1_10">&#167;3.1.10</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP3_1_11" class="paragraph-anchor"></a><b>&#167;3.1.11. </b>The pseudo-statement <span class="extract"><span class="extract-syntax">READ_XBIP</span></span> is handled as the assembly language <span class="extract"><span class="extract-syntax">@aread</span></span>.
We don't want to regard keyboard input as being a core feature of the Inter
instruction set, but rather as something available on some platforms and not
on others.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Statement</span><span class="named-paragraph-number">3.1.11</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">prim_cat</span><span class="plain-syntax"> != </span><span class="identifier-syntax">CODE_PRIM_CAT</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><a href="2-i6se.html#SP4" class="function-link"><span class="function-syntax">I6Errors::issue_at_node</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">node</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"statement in unexpected place"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">isn_clarifier</span><span class="plain-syntax"> == </span><span class="constant-syntax">CASE_BIP</span><span class="plain-syntax">) </span><a href="3-prd.html#SP10" class="function-link"><span class="function-syntax">Produce::set_level_to_current_code_block_plus</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="constant-syntax">2</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">isn_clarifier</span><span class="plain-syntax"> == </span><span class="constant-syntax">READ_XBIP</span><span class="plain-syntax">) </span><a href="3-prd.html#SP26" class="function-link"><span class="function-syntax">Produce::inv_assembly</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"@aread"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><a href="3-prd.html#SP24" class="function-link"><span class="function-syntax">Produce::inv_primitive</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">isn_clarifier</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">isn_clarifier</span><span class="plain-syntax"> == </span><span class="constant-syntax">OBJECTLOOP_BIP</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="named-paragraph-container code-font"><a href="2-eis.html#SP3_1_11_1" class="named-paragraph-link"><span class="named-paragraph">Handle OBJECTLOOP as a special case</span><span class="named-paragraph-number">3.1.11.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">arity</span><span class="plain-syntax"> = </span><a href="1-ip.html#SP9" class="function-link"><span class="function-syntax">Primitives::term_count</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">isn_clarifier</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">arity</span><span class="plain-syntax"> &gt; </span><span class="constant-syntax">0</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::down</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">inter_schema_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">inter_schema_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">last</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">; ((</span><span class="identifier-syntax">at</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">i</span><span class="plain-syntax">&lt;</span><span class="identifier-syntax">arity</span><span class="plain-syntax">)); </span><span class="identifier-syntax">i</span><span class="plain-syntax">++) {</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">EIS_RECURSE</span><span class="plain-syntax">(</span><span class="identifier-syntax">at</span><span class="plain-syntax">, </span><a href="1-ip.html#SP10" class="function-link"><span class="function-syntax">Primitives::term_category</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">isn_clarifier</span><span class="plain-syntax">, </span><span class="identifier-syntax">i</span><span class="plain-syntax">));</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">last</span><span class="plain-syntax"> = </span><span class="identifier-syntax">at</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (!((</span><span class="identifier-syntax">last</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">last</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">unclosed</span><span class="plain-syntax">))) </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::up</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP3_1">&#167;3.1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP3_1_11_1" class="paragraph-anchor"></a><b>&#167;3.1.11.1. </b>As noted in <a href="1-ip.html" class="internal">Inter Primitives</a>, the signature of <span class="extract"><span class="extract-syntax">OBJECTLOOP_BIP</span></span> is
<span class="extract"><span class="extract-syntax">ref val val code -&gt; void</span></span>, so it needs four operands:
</p>

<ul class="items"><li>(1) The <span class="extract"><span class="extract-syntax">ref</span></span> is the variable.
</li><li>(2) The first <span class="extract"><span class="extract-syntax">val</span></span> is the object class it ranges over. If we are unable to
narrow this down, we will simply make that <span class="extract"><span class="extract-syntax">Object</span></span>, the result being a
potentially slow loop over all objects.
</li><li>(3) The second <span class="extract"><span class="extract-syntax">val</span></span> is condition which must apply to any given <span class="extract"><span class="extract-syntax">x</span></span> for the
code block to be executed.
</li><li>(4) The <span class="extract"><span class="extract-syntax">code</span></span> is the code block.
</li></ul>
<p class="commentary">But it arrives here not with four child nodes, but just two, corresponding to
the second <span class="extract"><span class="extract-syntax">val</span></span> and the <span class="extract"><span class="extract-syntax">code</span></span> respectively. We must find the first two as
subexpressions of the first child, by directly probing its subtree. Consider
these possibilities:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">objectloop</span><span class="plain-syntax"> (</span><span class="identifier-syntax">x</span><span class="plain-syntax">) { ... }</span>
<span class="plain-syntax">                |  \ </span><span class="identifier-syntax">code</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">ref</span><span class="plain-syntax"> </span><span class="identifier-syntax">and</span><span class="plain-syntax"> </span><span class="identifier-syntax">second</span><span class="plain-syntax"> </span><span class="identifier-syntax">val</span><span class="plain-syntax">; </span><span class="identifier-syntax">first</span><span class="plain-syntax"> </span><span class="identifier-syntax">val</span><span class="plain-syntax"> </span><span class="identifier-syntax">is</span><span class="plain-syntax"> </span><span class="string-syntax">"Object"</span>

<span class="plain-syntax">    </span><span class="identifier-syntax">objectloop</span><span class="plain-syntax"> (</span><span class="identifier-syntax">x</span><span class="plain-syntax"> </span><span class="identifier-syntax">ofclass</span><span class="plain-syntax"> </span><span class="identifier-syntax">K1_thing</span><span class="plain-syntax">) { ... }</span>
<span class="plain-syntax">                |            |         |</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">ref</span><span class="plain-syntax">       </span><span class="identifier-syntax">first</span><span class="plain-syntax"> </span><span class="identifier-syntax">val</span><span class="plain-syntax">   </span><span class="identifier-syntax">code</span>
<span class="plain-syntax">               --------------------</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">second</span><span class="plain-syntax"> </span><span class="identifier-syntax">val</span>

<span class="plain-syntax">    </span><span class="identifier-syntax">objectloop</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">x</span><span class="plain-syntax"> </span><span class="identifier-syntax">ofclass</span><span class="plain-syntax"> </span><span class="identifier-syntax">K1_thing</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">x</span><span class="plain-syntax"> </span><span class="identifier-syntax">has</span><span class="plain-syntax"> </span><span class="identifier-syntax">container</span><span class="plain-syntax">)) { ... }</span>
<span class="plain-syntax">                 |             |                              |</span>
<span class="plain-syntax">                 </span><span class="identifier-syntax">ref</span><span class="plain-syntax">       </span><span class="identifier-syntax">first</span><span class="plain-syntax"> </span><span class="identifier-syntax">val</span><span class="plain-syntax">                         </span><span class="identifier-syntax">code</span>
<span class="plain-syntax">               -------------------------------------------</span>
<span class="plain-syntax">                               </span><span class="identifier-syntax">second</span><span class="plain-syntax"> </span><span class="identifier-syntax">val</span>
</pre>
<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Handle OBJECTLOOP as a special case</span><span class="named-paragraph-number">3.1.11.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::down</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_schema_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">oc_node</span><span class="plain-syntax"> = </span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">while</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">oc_node</span><span class="plain-syntax">) &amp;&amp;</span>
<span class="plain-syntax">        ((</span><span class="identifier-syntax">oc_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">isn_type</span><span class="plain-syntax"> != </span><span class="constant-syntax">OPERATION_ISNT</span><span class="plain-syntax">) ||</span>
<span class="plain-syntax">        (</span><span class="identifier-syntax">oc_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">isn_clarifier</span><span class="plain-syntax"> != </span><span class="constant-syntax">OFCLASS_BIP</span><span class="plain-syntax">)))</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">oc_node</span><span class="plain-syntax"> = </span><span class="identifier-syntax">oc_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">oc_node</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_schema_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">var_node</span><span class="plain-syntax"> = </span><span class="identifier-syntax">oc_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_schema_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">cl_node</span><span class="plain-syntax"> = </span><span class="identifier-syntax">var_node</span><span class="plain-syntax">?(</span><span class="identifier-syntax">var_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">):</span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">var_node</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">cl_node</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">EIS_RECURSE</span><span class="plain-syntax">(</span><span class="identifier-syntax">var_node</span><span class="plain-syntax">, </span><span class="identifier-syntax">REF_PRIM_CAT</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">EIS_RECURSE</span><span class="plain-syntax">(</span><span class="identifier-syntax">cl_node</span><span class="plain-syntax">, </span><span class="identifier-syntax">VAL_PRIM_CAT</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">            </span><a href="2-i6se.html#SP4" class="function-link"><span class="function-syntax">I6Errors::issue_at_node</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">node</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"malformed 'objectloop' header"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_schema_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">var_node</span><span class="plain-syntax"> = </span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">while</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">var_node</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">var_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">isn_type</span><span class="plain-syntax"> != </span><span class="constant-syntax">EXPRESSION_ISNT</span><span class="plain-syntax">))</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">var_node</span><span class="plain-syntax"> = </span><span class="identifier-syntax">var_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">var_node</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">var_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">expression_tokens</span><span class="plain-syntax">) &amp;&amp;</span>
<span class="plain-syntax">            ((</span><span class="identifier-syntax">var_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">expression_tokens</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">ist_type</span><span class="plain-syntax"> == </span><span class="constant-syntax">IDENTIFIER_ISTT</span><span class="plain-syntax">) ||</span>
<span class="plain-syntax">                (</span><span class="identifier-syntax">var_node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">expression_tokens</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">ist_type</span><span class="plain-syntax"> == </span><span class="constant-syntax">INLINE_ISTT</span><span class="plain-syntax">))) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">EIS_RECURSE</span><span class="plain-syntax">(</span><span class="identifier-syntax">var_node</span><span class="plain-syntax">, </span><span class="identifier-syntax">REF_PRIM_CAT</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><a href="3-prd.html#SP31" class="function-link"><span class="function-syntax">Produce::val_symbol</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">K_value</span><span class="plain-syntax">, </span><a href="2-if.html#SP5" class="function-link"><span class="function-syntax">IdentifierFinders::find</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"Object"</span><span class="plain-syntax">, </span><span class="identifier-syntax">finder</span><span class="plain-syntax">));</span>
<span class="plain-syntax">        } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">            </span><a href="2-i6se.html#SP4" class="function-link"><span class="function-syntax">I6Errors::issue_at_node</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">node</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"'objectloop' without visible variable"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_schema_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">EIS_RECURSE</span><span class="plain-syntax">(</span><span class="identifier-syntax">at</span><span class="plain-syntax">, </span><span class="identifier-syntax">VAL_PRIM_CAT</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">EIS_RECURSE</span><span class="plain-syntax">(</span><span class="identifier-syntax">at</span><span class="plain-syntax">, </span><span class="identifier-syntax">CODE_PRIM_CAT</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">unclosed</span><span class="plain-syntax"> == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::up</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP3_1_11">&#167;3.1.11</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP3_1_12" class="paragraph-anchor"></a><b>&#167;3.1.12. </b>Last and least: a subexpression node gives one or more nodes to be evaluated,
and if there's more than one, we use the <span class="extract"><span class="extract-syntax">SEQUENTIAL_BIP</span></span> operator (which is
like the comma in C) to throw away the results of the non-final evaluations.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Subexpression</span><span class="named-paragraph-number">3.1.12</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">d</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">inter_schema_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">node</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">child_node</span><span class="plain-syntax">; </span><span class="identifier-syntax">at</span><span class="plain-syntax">; </span><span class="identifier-syntax">at</span><span class="plain-syntax">=</span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">next_node</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">d</span><span class="plain-syntax">++;</span>
<span class="plain-syntax">            </span><a href="3-prd.html#SP24" class="function-link"><span class="function-syntax">Produce::inv_primitive</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="constant-syntax">SEQUENTIAL_BIP</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::down</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">EIS_RECURSE</span><span class="plain-syntax">(</span><span class="identifier-syntax">at</span><span class="plain-syntax">, </span><span class="identifier-syntax">prim_cat</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">while</span><span class="plain-syntax"> (</span><span class="identifier-syntax">d</span><span class="plain-syntax"> &gt; </span><span class="constant-syntax">0</span><span class="plain-syntax">) { </span><a href="3-prd.html#SP9" class="function-link"><span class="function-syntax">Produce::up</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">); </span><span class="identifier-syntax">d</span><span class="plain-syntax">--; }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-eis.html#SP3_1">&#167;3.1</a>.</li></ul>
<nav role="progress"><div class="progresscontainer">
    <ul class="progressbar"><li class="progressprev"><a href="2-i6o.html">&#10094;</a></li><li class="progresschapter"><a href="P-wtmd.html">P</a></li><li class="progresschapter"><a href="1-bm.html">1</a></li><li class="progresscurrentchapter">2</li><li class="progresssection"><a href="2-is.html">is</a></li><li class="progresssection"><a href="2-pis.html">pis</a></li><li class="progresssection"><a href="2-tkn.html">tkn</a></li><li class="progresssection"><a href="2-rmf.html">rmf</a></li><li class="progresssection"><a href="2-i6o.html">i6o</a></li><li class="progresscurrent">eis</li><li class="progresssection"><a href="2-if.html">if</a></li><li class="progresssection"><a href="2-i6a.html">i6a</a></li><li class="progresssection"><a href="2-i6se.html">i6se</a></li><li class="progresschapter"><a href="3-prd.html">3</a></li><li class="progressnext"><a href="2-if.html">&#10095;</a></li></ul></div>
</nav><!-- End of weave -->

		</main>
	</body>
</html>

